/*     */ package dm.jdbc.desc;
/*     */ 
/*     */ import dm.jdbc.dbaccess.Const;
/*     */ import java.util.Locale;
/*     */ 
/*     */ public class GlobalControlCfg
/*     */ {
/*   8 */   private static short m_timeZone = Const.TIME_ZONE_DEFAULT;
/*   9 */   private static long m_switchTimes = 3L;
/*  10 */   private static long m_switchInterv = 200L;
/*  11 */   private static boolean m_enRsCache = false;
/*  12 */   private static int m_rsCacheSize = 20;
/*  13 */   private static int m_rsRefreshFreq = 10;
/*  14 */   private static boolean m_keywordOpen = false;
/*  15 */   private static String[] m_keywordArr = null;
/*  16 */   private static Locale m_language = Locale.getDefault();
/*  17 */   private static boolean m_loginPrimary = true;
/*  18 */   private static boolean m_communicationEncrypt = true;
/*     */   
/*     */   static {
/*  21 */     DmSvcCfg svcCfg = new DmSvcCfg();
/*     */     
/*  23 */     svcCfg.initGlobalInfo();
/*     */   }
/*     */   
/*     */   public static void setKeywordOpen(boolean open) {
/*  27 */     m_keywordOpen = open;
/*     */   }
/*     */   
/*     */   public static boolean getKeywordOpen() {
/*  31 */     return m_keywordOpen;
/*     */   }
/*     */   
/*     */   public static void setLanguage(Locale lg) {
/*  35 */     m_language = lg;
/*     */   }
/*     */   
/*     */   public static Locale getLanguage() {
/*  39 */     return m_language;
/*     */   }
/*     */   
/*     */   public static void setKeywords(String[] keywords) {
/*  43 */     m_keywordArr = keywords;
/*     */   }
/*     */   
/*     */   public static String repaceReservedWord(String reservedWord) {
/*  47 */     if ((!m_keywordOpen) || (m_keywordArr == null) || (reservedWord == null)) {
/*  48 */       return reservedWord;
/*     */     }
/*  50 */     String strDesWord = "";
/*  51 */     int length = m_keywordArr.length;
/*  52 */     for (int i = 0; i < length; i++) {
/*  53 */       strDesWord = m_keywordArr[i];
/*  54 */       if (strDesWord.equalsIgnoreCase(reservedWord)) {
/*  55 */         return "\"" + strDesWord.toUpperCase() + "\"";
/*     */       }
/*     */     }
/*  58 */     return reservedWord;
/*     */   }
/*     */   
/*     */   public static void setEnRsCache(boolean enable) {
/*  62 */     m_enRsCache = enable;
/*     */   }
/*     */   
/*     */   public static boolean getEnRsCache() {
/*  66 */     return m_enRsCache;
/*     */   }
/*     */   
/*     */   public static void setRsCacheSize(int size) {
/*  70 */     m_rsCacheSize = size;
/*     */   }
/*     */   
/*     */   public static int getRsCacheSize() {
/*  74 */     return m_rsCacheSize;
/*     */   }
/*     */   
/*     */   public static void setRsRefreshFreq(int freq) {
/*  78 */     m_rsRefreshFreq = freq;
/*     */   }
/*     */   
/*     */   public static int getRsRefreshFreq() {
/*  82 */     return m_rsRefreshFreq;
/*     */   }
/*     */   
/*     */   public static void setTimeZone(short tz) {
/*  86 */     m_timeZone = tz;
/*     */   }
/*     */   
/*     */   public static short getTimeZone() {
/*  90 */     return m_timeZone;
/*     */   }
/*     */   
/*     */   public static void setSwitchTimes(long times) {
/*  94 */     m_switchTimes = times;
/*     */   }
/*     */   
/*     */   public static long getSwitchTimes() {
/*  98 */     return m_switchTimes;
/*     */   }
/*     */   
/*     */   public static void setSwitchInterv(long interv) {
/* 102 */     m_switchInterv = interv;
/*     */   }
/*     */   
/*     */   public static long getSwitchInterv() {
/* 106 */     return m_switchInterv;
/*     */   }
/*     */   
/*     */   public static void setLoginPrimary(boolean loginPrimary) {
/* 110 */     m_loginPrimary = loginPrimary;
/*     */   }
/*     */   
/*     */   public static boolean getLoginPrimary() {
/* 114 */     return m_loginPrimary;
/*     */   }
/*     */   
/*     */   public static void setCommunicationEncrypt(boolean communicationEncrypt) {
/* 118 */     m_communicationEncrypt = communicationEncrypt;
/*     */   }
/*     */   
/*     */   public static boolean getCommunicationEncrypt() {
/* 122 */     return m_communicationEncrypt;
/*     */   }
/*     */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\jdbc\desc\GlobalControlCfg.class
 * Java compiler version: 2 (46.0)
 * JD-Core Version:       0.7.1
 */